package com.coocaa.aries.codegen.constant;


import com.coocaa.aries.codegen.model.ColumnConfigModel;
import com.coocaa.aries.core.tool.json.JsonUtil;

import java.util.List;

/**
 * @author : bijiahao
 * @date : 2019/4/19.
 * @description:<p> </p>
 */
public class GlobalConstants {

    public static final String ZIP_FILE_NAME = "codeGen.zip";

    public static final String SRC_MAIN_JAVA = "src/main/java";
    private static final String SUPER_CLASS_COLUMN_LIST_STR = "[\n" +
            "    {\n" +
            "        \"columnName\":\"flag\",\n" +
            "        \"columnType\":\"INTEGER\",\n" +
            "        \"comment\":\"是否启用,1-启用0-禁用\",\n" +
            "        \"fieldName\":\"flag\",\n" +
            "        \"javaType\":\"Integer\"\n" +
            "    },\n" +
            "    {\n" +
            "        \"columnName\":\"creater\",\n" +
            "        \"columnType\":\"INTEGER\",\n" +
            "        \"comment\":\"创建人\",\n" +
            "        \"fieldName\":\"creater\",\n" +
            "        \"javaType\":\"Integer\"\n" +
            "    },\n" +
            "    {\n" +
            "        \"columnName\":\"created_date\",\n" +
            "        \"columnType\":\"DATE\",\n" +
            "        \"comment\":\"创建时间\",\n" +
            "        \"fieldName\":\"createdDate\",\n" +
            "        \"javaType\":\"Date\"\n" +
            "    },\n" +
            "    {\n" +
            "        \"columnName\":\"modifier\",\n" +
            "        \"columnType\":\"INTEGER\",\n" +
            "        \"comment\":\"修改人\",\n" +
            "        \"fieldName\":\"modifier\",\n" +
            "        \"javaType\":\"Integer\"\n" +
            "    },\n" +
            "    {\n" +
            "        \"columnName\":\"last_update_date\",\n" +
            "        \"columnType\":\"DATE\",\n" +
            "        \"comment\":\"更新时间\",\n" +
            "        \"fieldName\":\"lastUpdateDate\",\n" +
            "        \"javaType\":\"Date\"\n" +
            "    }\n" +
            "]";

    public static List<ColumnConfigModel> listSuperClassColumn() {
        return JsonUtil.json2ObjectLists(SUPER_CLASS_COLUMN_LIST_STR, ColumnConfigModel.class);
    }


}
